<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>课时3</title>
	</head>
	<body>
		<script type="text/javascript">
			for( var i = 0 ; i < 10 ; i++ ){
				console.log(i);
			}
			//object 对象
			var person = {
				name : 'grape',
				age : '18'
			}
			console.log('I am' + person.name + ', my age is' + person.age);
			
			//打印数据相应的类型   typeof()
			//基本的类型 number string boolean  object undefined
			// Object = 引用类型  object/array
			console.log(typeof(i));
			console.log(typeof(typeof(i)));   //数据类型再数据类型就是string
			
			// 显式类型转换  和隐式类型转换
		    //显示类型转换 Number(a)  parseInt(a)
			var a = '123';
			console.log(Number(a) + '类型为'+ typeof(Number(a)));  //123类型为number
			console.log(parseInt(a) + '类型为'+ typeof(parseInt(a))); 
			
		</script>
	</body>
</html>
